Ext.define('LoginPanel', {
    extend: 'Ext.form.Panel',
    width : 320,    
    initComponent : function(){
    	Ext.apply(this,{
		    xtype: 'login-form',
		    title: Message.login.title,
		    frame:true,
		    x :(document.body.clientWidth / 2) - 130,
		    y: (document.body.clientHeight / 2) + 260,
		    width: 320,
		    bodyPadding: 10,
		    defaultType: 'textfield',
		    standardSubmit : true,
		    defaults: {
		        anchor: '100%',
		        msgTarget : 'side'
		    },
		    items: [{
		    	xtype : 'hiddenfield',
		    	name : 'callPageURL',
		    	value : directAccessRequestUrl
		    },{
	            allowBlank: false,
	            fieldLabel: 'User ID',
	            name: 'id',
	            value : (loginId)?loginId:'admin'
	        },{
	            allowBlank: false,
	            fieldLabel: 'Password',
	            name: 'pw',
	            inputType: 'password',
	            value : '111'
	        }],
		    buttons: [{ 
		        text:'Login',
		        scope : this,
		        handler : function(){
		        	if(!this.form.isValid()) return;
		        	this.getForm().submit({
		        		url : 'checkLogin.do',
		        		method : 'post' 
		        	});
		        }
		    }]
    	});
    	
    	if(loginStatus){
    		Common.alert(Message.warrning,Message.login.invalidPassword);    		
    	}
    	this.callParent(arguments);
    }
});